package com.cskaoyan.bean.usersadmin;

import com.cskaoyan.bean.po.MarketCollect;
import lombok.Data;

import java.util.List;

/**
 * ClassName: CollectData
 * Description:
 * date: 2022/6/5 19:45
 *
 * @author bruce
 * @since JDK 8
 */
@Data
public class CollectData {
    /**
     * total : 22
     * pages : 2
     * limit : 20
     * page : 1
     * list : [{"id":113,"userId":1,"valueId":1181111,"type":0,"addTime":"2022-05-14 17:41:20","updateTime":"2022-05-14 17:41:20","deleted":false},{"id":111,"userId":1,"valueId":1181009,"type":0,"addTime":"2022-05-11 15:24:13","updateTime":"2022-05-11 15:24:13","deleted":false}]
     */
    private int total;
    private int pages;
    private int limit;
    private int page;
    private List<MarketCollect> list;

    public static CollectData data(long total, int pages, int limit, int page, List<MarketCollect> list) {
        CollectData collectData = new CollectData();
        collectData.setTotal((int) total);
        collectData.setPages(pages);
        collectData.setLimit(limit);
        collectData.setPage(page);
        collectData.setList(list);
        return collectData;
    }
}
